set(TEST_PROGS
	demo_fifo_poll
	demo_fifo_select
	demo_fifo_epoll
)

# add_link_options(-Wl,rpath=.)

foreach(PROG ${TEST_PROGS})
	add_executable(${PROG} ${PROG}.cpp)
	target_include_directories(${PROG}
		PRIVATE ${CMAKE_SOURCE_DIR}/inc)
	target_link_libraries(${PROG} iomux)
	install(TARGETS ${PROG} DESTINATION bin)
endforeach()

project(c_demo C)

add_subdirectory(builtin_return_address)
add_subdirectory(sort)
add_subdirectory(pthread)
add_subdirectory(macro)
add_subdirectory(test_stack)
add_subdirectory(xfifo)
add_subdirectory(iomux)
add_subdirectory(listdir)
add_subdirectory(aio)
add_subdirectory(io_uring)
add_subdirectory(fs_file)
add_subdirectory(array)
add_subdirectory(struct)
